// let obj = {errcode:true,sex:2}
function stringify(obj){
    // 
    // 1.定义空数组
    let arr = []
    // 2.遍历对象，将键和值push到空数组中
    for(let key in obj){
        let temp = obj[key]
        arr.push(`"${key}":${temp}`)
    }
    
    console.log(arr);
    let javaData = `{${arr.join(',')}}`
    // let javaData = '{' + arr.join(',') + '}'
    // console.log(javaData);
    return javaData
    }